<template>
    <div>
        <div class="header">
            <span class="search-header">搜索用户数</span>
            <svg t="1673504826098" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                p-id="2359" width="32" height="32">
                <path
                    d="M536 480v192a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16V480a16 16 0 0 1 16-16h16a16 16 0 0 1 16 16z m-32-128h16a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16h-16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16z m8 448c159.056 0 288-128.944 288-288s-128.944-288-288-288-288 128.944-288 288 128.944 288 288 288z m0 48c-185.568 0-336-150.432-336-336s150.432-336 336-336 336 150.432 336 336-150.432 336-336 336z"
                    fill="#cdcdcd" p-id="2360"></path>
            </svg>
        </div>
        <div class="main">
            <span class="main-title">12321</span>
            <span class="main-content">17.1</span>
            <svg t="1673506584291" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                p-id="5559" width="16" height="16">
                <path d="M512 378.24l-418.88 418.88L0 704l512-512 512 512-93.12 93.12z" fill="#1afa29" p-id="5560">
                </path>
            </svg>
            
            <svg t="1673506622311" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                p-id="6591" width="16" height="16">
                <path d="M512 610.88L930.88 192 1024 285.12l-512 512-512-512L93.12 192z" fill="#d81e06" p-id="6592">
                </path>
            </svg>
        </div>
        <div class="footer">
            <div class="charts" ref="charts">

            </div>
        </div>
    </div>
</template>

<script>
import echarts from 'echarts'
export default {
    name: 'lineCharts',
    mounted() {
            //初始化echarts
            let lineCharts = echarts.init(this.$refs.charts)
            //配置
            lineCharts.setOption({
                xAxis:{
                    show:false,
                    type:'category'
                },
                yAxis:{
                    show:false
                },
                //系列
                series:[
                    {
                        type:'line',
                        data:[3,6,4,7,3,5,4,2,5],
                        //拐点
                        itemStyle:{
                            opacity:0
                        },
                        //线条颜色
                        lineStyle:{
                            color:'purple'
                        },
                        //填充颜色
                        areaStyle:{
                            color:{
                                type:'linear',
                                x:0,
                                y:0,
                                x2:0,
                                y2:1,
                                colorStops:[
                                    {
                                        offset:0,
                                        color:'purple',
                                    },
                                    {
                                        offset:1,
                                        color:'#fff'
                                    }
                                ],
                                global:false ,//
                            }
                        }
                    }
                ],
                //布局调试
                grid:{
                    left:0,
                    top:0,
                    right:0,
                    bottom:0
                }
            })
        },
}
</script>

<style scoped>
.header {
    display: flex;
    align-items: center;
}

.search-header {
    margin-right: 20px;
}
.main{
    margin:10px 0;
}
.main-title{
    margin-right: 10px;
}
.main-content{
    margin-right: 10px;
}
.charts{
    width: 100%;
    height: 50px;
}
</style>